﻿using Dapper;
using System;
using BCEntity.CRM.IndustryCategory;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.CRM.IndustryCategory
{
    /// <summary>
    /// 行业类别
    /// </summary>
    public interface IIndustryCategoryData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="industryCategoryId">行业类别Id</param>
        Task<bool> Exists(long industryCategoryId);
        /// <summary>
        /// 增加行业类别
        /// </summary>
        /// <param name="entity">行业类别信息</param>
        Task<IndustryCategoryEntity> Add(IndustryCategoryEntity entity);
        /// <summary>
        /// 更新行业类别
        /// </summary>
        /// <param name="entity">行业类别信息</param>
        Task<IndustryCategoryEntity> Update(IndustryCategoryEntity entity);
        /// <summary>
        /// 删除行业类别
        /// </summary>
        /// <param name="industryCategoryId">行业类别Id</param>
        Task<bool> Delete(long industryCategoryId);
        /// <summary>
        /// 获取行业类别
        /// </summary>
        /// <param name="industryCategoryId">行业类别Id</param>
        Task<IndustryCategoryEntity> GetEntity(long industryCategoryId);
        /// <summary>
        /// 获取行业类别列表
        /// </summary>
        Task<IEnumerable<IndustryCategoryEntity>> GetList();
        /// <summary>
        /// 获取行业类别分页列表
        /// </summary>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<IndustryCategoryEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}